From 2c9184d047b79ea772571e1540ef0aa0fb44ab91 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 5 Apr 2017 16:35:39 -0700 Subject: [PATCH] Touch up line lengths --- src/cargo/util/toml.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/cargo/util/toml.rs b/src/cargo/util/toml.rs index 157295246..990a7d856 100644 --- a/src/cargo/util/toml.rs +++ b/src/cargo/util/toml.rs @@ -1383,13 +1383,19 @@ fn normalize(package_root: &Path, ret } -fn inferred_bin_path(bin: &TomlBinTarget, package_root: &Path, lib: bool, bin_len: usize) -> PathBuf { - // we have a lib with multiple bins, so the bins are expected to be located inside src/bin +fn inferred_bin_path(bin: &TomlBinTarget, + package_root: &Path, + lib: bool, + bin_len: usize) -> PathBuf { + // we have a lib with multiple bins, so the bins are expected to be located + // inside src/bin if lib && bin_len > 1 { - return Path::new("src").join("bin").join(&format!("{}.rs", bin.name())).to_path_buf() + return Path::new("src").join("bin").join(&format!("{}.rs", bin.name())) + .to_path_buf() } - // we have a lib with one bin, so it's either src/main.rs, src/bin/foo.rs or src/bin/main.rs + // we have a lib with one bin, so it's either src/main.rs, src/bin/foo.rs or + // src/bin/main.rs if lib && bin_len == 1 { let path = Path::new("src").join(&format!("main.rs")); if package_root.join(&path).exists() { -- 2.30.2